-- GENERATED SPELL FOR [Watcher Silthik] --


function spell0_28731(pUnit, Event) --@Infected Bite,n/a--
pUnit:FullCastSpellOnTarget(52469,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28731', 9000, 1)
end

function spell1_28731(pUnit, Event) --@Infected Bite,n/a--
pUnit:FullCastSpellOnTarget(59364,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28731', 9000, 1)
end

function spell2_28731(pUnit, Event) --@Poison Spray,n/a--
pUnit:FullCastSpellOnTarget(52493,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28731', 11500, 1)
end

function spell3_28731(pUnit, Event) --@Poison Spray,n/a--
pUnit:FullCastSpellOnTarget(59366,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28731', 11500, 1)
end

function spell4_28731(pUnit, Event) --@Web Wrap,n/a--
pUnit:FullCastSpellOnTarget(52086,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28731', 3308, 1)
end

function Sorts_28731(pUnit, Event)
local choix_sorts_28731 = math.random(0, 4)
if choix_sorts_28731 == 0 then
pUnit:RegisterEvent('spell0_28731', 1, 1)
end
if choix_sorts_28731 == 1 then
pUnit:RegisterEvent('spell1_28731', 1, 1)
end
if choix_sorts_28731 == 2 then
pUnit:RegisterEvent('spell2_28731', 1, 1)
end
if choix_sorts_28731 == 3 then
pUnit:RegisterEvent('spell3_28731', 1, 1)
end
if choix_sorts_28731 == 4 then
pUnit:RegisterEvent('spell4_28731', 1, 1)
end
end

function mob28731_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28731', math.random(1500, 3000), 1)
end

function mob28731_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28731_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28731_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28731, 1, 'mob28731_Action')
RegisterUnitEvent(28731, 2, 'mob28731_Leave')
RegisterUnitEvent(28731, 3, 'mob28731_Kill')
RegisterUnitEvent(28731, 4, 'mob28731_Die')
